package top.infopub.mgr.mgc.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.mgc.dao.MsgTemplateDao;
import top.infopub.mgr.mgc.domain.MsgTemplateDomain;
import top.infopub.mgr.mgc.service.MsgTemplateService;
import top.infopub.model.mgc.MsgTemplate;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;


@Service
public class MsgTemplateServiceImpl extends GenericServiceImpl<MsgTemplate, String> implements MsgTemplateService {

    @Autowired
    private MsgTemplateDao msgTemplateDao;

    @Override
    public GenericDao<MsgTemplate, String> getDao() {
        return msgTemplateDao;
    }

    @Override
    public Page<MsgTemplateDomain> queryPageByDomainWhere(Page<MsgTemplateDomain> page,
                                                          MsgTemplate vo) {
        PageHelper.startPage(page.getPageNum(), page.getPageSize());
        return (Page<MsgTemplateDomain>)msgTemplateDao.selectByDomainWhere(vo);
    }

}